package isp.apps.example.shoppingcart.domain;

import java.text.DateFormat;

import java.util.Calendar;

public class CreditCard
{
  private Integer id, valid, securityLength;
  private String name;
  private Calendar invalidDate;

  public CreditCard()
  {
  }
  
  public String getInvalidTimeStamp()
  {
    return DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM).format(invalidDate.getTime());
  }

  public void setValid(Integer valid)
  {
    this.valid = valid;
  }

  public Integer getValid()
  {
    return valid;
  }

  public void setId(Integer id)
  {
    this.id = id;
  }

  public Integer getId()
  {
    return id;
  }

  public void setSecurityLength(Integer securityLength)
  {
    this.securityLength = securityLength;
  }

  public Integer getSecurityLength()
  {
    return securityLength;
  }

  public void setName(String name)
  {
    this.name = name;
  }

  public String getName()
  {
    return name;
  }

  public void setInvalidDate(Calendar invalidDate)
  {
    this.invalidDate = invalidDate;
  }

  public Calendar getInvalidDate()
  {
    return invalidDate;
  }
}
